from selenium.webdriver.common.by import By

from pages.base_page import Page


class ChatsPage(Page):
    ele_chats_title = (By.ID, u"page-chat-title")
    ele_date_select = (By.XPATH, u'(//div[@data-tag="filterItem"]//label[@role="button"])[1]')
    ele_key_words = (By.ID, u"table-chat-filter-keywords")
    # ele_campaign = (By.XPATH, u'//span[text()="testAutomationTest"]')

    def __init__(self, driver, url, site_id):
        Page.__init__(self, driver, url)
        self.site_id = site_id
        self.url = url

    def chats_page_eles_check(self):
        self.find_element(*self.ele_chats_title).is_enabled()
        self.find_element(*self.ele_date_select).is_enabled()
        self.find_element(*self.ele_key_words).is_enabled()
        # self.find_element(*self.ele_campaign).is_enabled()

